<%@ tag pageEncoding="UTF-8" %>
<%@ include file="inc/taglibs.jsp" %>
<%@ tag import="org.apache.commons.beanutils.BeanUtils" %>	
<%@ tag import="com.pearlsoft.util.StringUtils" %>

<%-- 通用属性  --%>
<%@ attribute rtexprvalue="true" required="false" name="var"%>
<%@ attribute rtexprvalue="true" required="false" name="id"%>
<%@ attribute rtexprvalue="true" required="false" name="config" 
	description="如果为true，只输出配置项，如果为false，输出内容如new cmpclass(config)，默认为false"%>
<%@ attribute rtexprvalue="true" required="false" name="disabled"%>
<%@ attribute rtexprvalue="true" required="false" name="hidden"%>
<%@ attribute rtexprvalue="true" required="false" name="renderTo"%>
<%@ attribute rtexprvalue="true" required="false" name="scripts"%>
<%@ attribute rtexprvalue="true" required="false" name="styles"%>
<%@ attribute rtexprvalue="true" required="false" name="width" %>
<%@ attribute rtexprvalue="true" required="false" name="height" %>

<%-- Field共性  --%>
<%@ attribute rtexprvalue="true" required="false" name="value" %>
<%@ attribute rtexprvalue="true" required="false" name="fieldLabel" %>
<%@ attribute rtexprvalue="true" required="false" name="labelAlign" %>
<%@ attribute rtexprvalue="true" required="false" name="labelWidth" %>
<%@ attribute rtexprvalue="true" required="false" name="labelSeparator" %>
<%@ attribute rtexprvalue="true" required="false" name="readOnly" %>
<%@ attribute rtexprvalue="true" required="false" name="submitValue" %>
<%@ attribute rtexprvalue="true" required="false" name="inputType" %>
<%@ attribute rtexprvalue="true" required="false" name="invalidText" %>
<%@ attribute rtexprvalue="true" required="false" name="tabIndex" %>

<%-- TEXT Field共性  --%>
<%@ attribute rtexprvalue="true" required="false" name="allowBlank" %>
<%@ attribute rtexprvalue="true" required="false" name="blankText" %>
<%@ attribute rtexprvalue="true" required="false" name="emptyText" %>
<%@ attribute rtexprvalue="true" required="false" name="maxLength" %>
<%@ attribute rtexprvalue="true" required="false" name="maxLengthText" %>
<%@ attribute rtexprvalue="true" required="false" name="vtype" %>
<%@ attribute rtexprvalue="true" required="false" name="size" %>
<%-- UI特性  --%>
<%@ attribute rtexprvalue="true" required="false" name="editable" %>
<%@ attribute rtexprvalue="true" required="false" name="forceSelection" %>
<%@ attribute rtexprvalue="true" required="false" name="selectOnFocus" %>
<%@ attribute rtexprvalue="true" required="false" name="triggerAction" %>





<%-- 扩展属性  --%>
<%@ attribute rtexprvalue="true" required="false" name="data" 
description="要求为数组，一维数组时displayField,valueField都为数组的值，
二位数组时:index 0为valueField，index 1为displayField" %>



<plst:cmpResources scripts="${scripts}" styles="${styles}" >
	<plsc:component name="Ext.form.field.ComboBox" var="${var}" config="${config}"  >
		<plsc:attr name="id" test="${!empty(id)}">${id}</plsc:attr>
		<plsc:attr name="xtype" test="${config == true}">combobox</plsc:attr>
		<plsc:attr name="disabled" test="${!empty(disabled)}" type="boolean" >${disabled}</plsc:attr>
		<plsc:attr name="hidden" test="${!empty(hidden)}" type="boolean" >${hidden}</plsc:attr>		
		<plsc:attr name="renderTo" test='<%=StringUtils.isNotEmpty(renderTo)%>'
			type='<%= StringUtils.getRenderType(renderTo)%>'>${renderTo}</plsc:attr>
		<plsc:attr name="width" test="${!empty(width)}"  type="int" >${width}</plsc:attr>
		<plsc:attr name="height" test="${!empty(height)}"  type="int" >${height}</plsc:attr>
		<%-- Field 共性  --%>
		<plsc:attr name="name" test="${!empty(id)}">${id}</plsc:attr>
		<plsc:attr name="value" test="${!empty(value)}">${value}</plsc:attr>
		<plsc:attr name="fieldLabel" test="${!empty(fieldLabel)}">${fieldLabel}</plsc:attr>
		<plsc:attr name="labelAlign" test="${!empty(labelAlign)}">${labelAlign}</plsc:attr>
		<plsc:attr name="labelSeparator" test="${!empty(labelSeparator)}">${labelSeparator}</plsc:attr>
		<plsc:attr name="labelWidth" test="${!empty(labelWidth)}"  type="int" >${labelWidth}</plsc:attr>
		<plsc:attr name="readOnly" test="${!empty(readOnly)}" type="boolean" >${readOnly}</plsc:attr>		
		<plsc:attr name="submitValue" test="${!empty(submitValue)}" type="boolean" >${submitValue}</plsc:attr>		
		<plsc:attr name="inputType" test="${!empty(inputType)}">${inputType}</plsc:attr>
		<plsc:attr name="invalidText" test="${!empty(invalidText)}">${invalidText}</plsc:attr>
		<plsc:attr name="tabIndex" test="${!empty(tabIndex)}"  type="int" >${tabIndex}</plsc:attr>
		<%-- TEXT Field共性  --%>
		<plsc:attr name="allowBlank" test="${!empty(allowBlank)}" type="boolean" >${allowBlank}</plsc:attr>		
		<plsc:attr name="blankText" test="${!empty(blankText)}">${blankText}</plsc:attr>
		<plsc:attr name="emptyText" test="${!empty(emptyText)}">${emptyText}</plsc:attr>
		<plsc:attr name="maxLength" test="${!empty(maxLength)}"  type="int" >${maxLength}</plsc:attr>
		<plsc:attr name="maxLengthText" test="${!empty(maxLengthText)}">${maxLengthText}</plsc:attr>
		<plsc:attr name="vtype" test="${!empty(vtype)}">${vtype}</plsc:attr>
		<plsc:attr name="size" test="${!empty(size)}"  type="int" >${size}</plsc:attr>
		<%-- UI特性  --%>
		<plsc:attr name="editable"   type="boolean" >${empty(editable)?false:editable}</plsc:attr>
		<plsc:attr name="forceSelection"   type="boolean" >${empty(forceSelection)?true:forceSelection}</plsc:attr>
		<plsc:attr name="selectOnFocus"   type="boolean" >${empty(selectOnFocus)?true:selectOnFocus}</plsc:attr>
		<plsc:attr name="triggerAction"   type="string" >${empty(triggerAction)?'all':triggerAction}</plsc:attr>
		<plsc:attr name="queryMode"  type="string" >local</plsc:attr>

		
		<%-- 扩展属性  --%>
		<plsc:attr name="store" test="${!empty(data)}"  type="direct" >${data}</plsc:attr>
		
		<jsp:doBody/>
		</plsc:component>
</plst:cmpResources>